<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>产品详情</title>
    <include file="Template/head"/>
    <link href="http://cdn.lydlr.com/public/css/ticket.css?v=3" rel="stylesheet">
    <style>
        .ticket-bottom a i {
            background: rgba(0, 0, 0, 0) url("http://cdn.lydlr.com/public/kangtai/images/detail-icon.png") no-repeat scroll 0 -392px / 40px auto;
            display: inline-block;
            height: 26px;
            margin-right: 5px;
            position: relative;
            top: 8px;
            width: 25px;
        }
    </style>
    <?php
require_once "./App/Home/Common/jssdk.php";
$jssdk = new JSSDK("wx50158a5e179525ab", "d4065289c8314cbb82bb64d58eda674b");
$signPackage = $jssdk->GetSignPackage();
    ?>
<body>
<div class="actNav">
    <div class="doRefresh">产品详情</div>
    <input type="hidden" id="ticketUrl" value="{:U('Ticket/index')}">
    <input type="hidden" class="regionCode" value="{$ticketList.0.code}">
    <a href="javascript:void(0);" class="back" onclick="self.location=document.referrer;"></a>
    <a href="{:U('Index/index')}" class="home"></a>
</div>

<div class="wapper detailPage">
    <img class='lazy headImg' data-original="{$ticketList.0.imgs|getPicPath}"/>

    <form method="post" action="">
        <div class="module">
            <h1 class="title" style="padding:10px;overflow:visible;height:auto;line-height:25px;">
                <b>{$ticketList.0.name}</b>
            </h1>

            <!--<div class="price clearfix" style="border-top:0px;border-bottom: 0px">
                  <span class="w pull-left">
                        开放时间：09:00 - 17:00
                  </span>
            </div>-->

            <div class="price clearfix" style="border-top:0px;border-bottom: 0px">
                <span class="w pull-left">
                    景点地址：{$ticketList.0.address}
                </span>
            </div>

            <div style="height:10px;background:#EFF0F0;margin-top:15px;"></div>
        </div>

        <!--<ul id="myTab" class="nav nav-tabs" style='background:white'>-->
        <!--<li class="active text-center" style='width:50%'><a href="#home" data-toggle="tab">-->
        <!--购票</a></li>-->
        <!--<li class='text-center' style='width:50%'><a href="#ios" data-toggle="tab">详情</a></li>-->
        <!--</ul>-->

        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade in active" id="home">
                <div class="module blockItem">
                    <div class="t" data-event-trigger style='border-bottom:1px solid #D8D8D8'><i class="icon i-3"></i>门票<span
                            class="arrow"></span></div>
                    <div class="">
                        <div class="box">
                            <div style='margin-left:20px;'>
                                <foreach name='ticketList' item='vo'>
                                    <p style='height:30px;line-height:20px;font-size:14px;margin-top:5px;'><b><a
                                            href="{:U('Ticket/showFeeInclude',array('id' => $vo['id']))}">{$vo.product_name}</a></b>
                                    </p>

                                    <p style='height:50px;line-height:50px;'><dfn
                                            style='color:#fc810c;font-size:20px;'>&yen;
                                        <if condition="$Think.session.isLogin eq 'yes'">
                                            {$vo.sell_price|getYuan} - {$vo.settle_price|getYuan} = {$vo['sell_price'] -
                                            $vo['settle_price']|getYuan}
                                            <else/>
                                            {$vo.sell_price|getYuan}
                                        </if>
                                    </dfn>
                                    </p>
                                    <p style="height:40px;border-bottom: 1px dashed #ddd;margin-top: -10px;">

                                        <if condition="$Think.session.isLogin eq 'yes'">
                                            <a href="{:U('Ticket/showTicketInfo',array('id' => $vo['id']))}">
                                                <input type='button' class='btn btn-warning'
                                                       style='float:right;margin-right: 5px' value='立即预订'>
                                            </a>
                                            <else/>
                                            <a href="tel:{$userInfo.mobile}"
                                               style='color:#2DC2C7;float:right;margin-right:10px;'>
                                                <i style="background: rgba(0, 0, 0, 0) url('http://cdn.lydlr.com/public/kangtai/images/detail-icon.png') no-repeat scroll 0 -392px / 40px auto;display: inline-block;height: 26px;margin-right: 5px;position: relative;top: 8px;width: 25px;"></i>电话咨询</a>
                                        </if>
                                    </p>
                                </foreach>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="module blockItem">
                    <div class="t" data-event-trigger><i class="icon i-4"></i>预定须知<span class="arrow"></span></div>
                    <div class="con pad">
                        <p>★ 下单后 {$ticketList.0.auto_cancel_time} 分钟不支付自动取消</p>
                        <p>★ 预订限制：
                            <if condition="$ticketList['0']['book_advance_day'] eq '0'">当天
                                <else/>
                                {$ticketList.0.book_advance_day} 天
                            </if>
                        </p>
                        <p>★ 最大购买量： {$ticketList.0.buy_max_num} 张</p>
                        <p>★ 最小购买量： {$ticketList.0.buy_min_num} 张</p>
                        <p>★ 是否支持退款：
                            <if condition="$ticketList['0']['can_refund'] eq 'true'">支持
                                <else/>
                                不支持
                            </if>
                        </p>
                        <p>★ 是否实名制：
                            <if condition="$ticketList['0']['is_real_name'] eq 'true'">是
                                <else/>
                                否
                            </if>
                        </p>
                        <p>★ 是否需要游客证：
                            <if condition="$ticketList['0']['credentials_required'] eq 'true'">需要,
                                <if condition="$ticketList[0]['certificate_type'] eq 1">
                                    身份证
                                <elseif condition="$ticketList[0]['certificate_type'] eq 2"/>
                                    导游证
                                <elseif condition="$ticketList[0]['certificate_type'] eq 4"/>
                                    学生证
                                <elseif condition="$ticketList[0]['certificate_type'] eq 8"/>
                                    军官证
                                <elseif condition="$ticketList[0]['certificate_type'] eq 16"/>
                                    老年证
                                <elseif condition="$ticketList[0]['certificate_type'] eq 32"/>
                                    出生证
                                <elseif condition="$ticketList[0]['certificate_type'] eq 64"/>
                                    驾驶证
                                <elseif condition="$ticketList[0]['certificate_type'] eq 128"/>
                                    其他
                                </if>
                                <else/>
                                不需要
                            </if>
                        </p>
                        <p>★ 游客购买日起 {$ticketList.0.days_after_use_date_valid} 天内有效</p>
                        <p>★ 自出行之日起 {$ticketList.0.period_validity_of_refund} 天内可退票</p>
                        <p>★ 退票费: &yen;<dfn>{$ticketList.0.refund_fee}</dfn> 元</p>
                        <p>★ 退票说明: {$ticketList.0.refund_info}</p>
                        <p>★ 使用说明: {$ticketList.0.remind}</p>
                    </div>
                </div>
                <div class="module blockItem">
                    <div class="t" data-event-trigger><i class="icon i-2"></i>退票说明<span class="arrow"></span></div>
                    <div class="con pad">
                        <p>★ 是否支持退票：
                            <if condition="$ticketList['0']['can_refund'] eq 'true'">支持
                                <else/>
                                不支持
                            </if>
                        </p>
                        <p>★ 退票说明: {$ticketList.0.refund_info}</p>
                    </div>
                </div>
                <if condition="$Think.session.isLogin eq 'yes'">
                    <div class="module blockItem">
                        <div class="t" data-event-trigger><i class="icon i-21"></i>景点电话<span class="arrow"></span></div>
                        <div class="con pad">
                            <span style='color:#2DC2C7;margin-right:10px;'>电话咨询: {$ticketList.0.phone}</span>
                        </div>
                    </div>
                </if>
            </div>

        </div>

        <footer class="footer">
            <include file="Template/foot"/>
        </footer>
    </form>
</div>
<script src="__PUBLIC__/js/ticket.js?v=1"></script>

<script type="text/javascript">
    $(".headImg").addClass("carousel-inner img-responsive img-rounded");

    wx.config({
        debug: false,
        appId: '<?php echo $signPackage["appId"];?>',
        timestamp: '<?php echo $signPackage["timestamp"]; ?>',
        nonceStr: '<?php echo $signPackage["nonceStr"];?>',
        signature: '<?php echo $signPackage["signature"];?>',
        jsApiList: [
            'onMenuShareTimeline',
            'onMenuShareAppMessage',
            'onMenuShareQQ',
        ]
    });

    wx.ready(function () {
        var shareData = {
            desc: "{$ticketList.0.SightName}",
            title: "{$ticketList.0.SightName}",
            link: "{$domain}",
            imgUrl: '{$headPic}',
        };
        wx.onMenuShareTimeline(shareData);
        wx.onMenuShareAppMessage(shareData);
        wx.onMenuShareQQ(shareData);
    });

</script>
</body>
</html>
